﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeBehind="Customer.aspx.cs" Inherits="mini_crm_system.Customer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="Form1" runat="server">
    <table width="100%">
        <tr>
            <td style="width: 200px; padding: 0 20px 0 0;">
                <div style="padding: 5px; background-color: #EBEBEB; display: block; height: 400px;
                    text-align: center;">
                    <div style="text-align: left;">
                        <font style="font-weight: bold; color: Black;">查找客户</font>
                        <hr style="width: 100%; height: 1px; color: Gray;" />
                        <br />
                        <font style="color: Black;">客户姓名:</font>
                        <asp:TextBox ID="TextBox1" runat="server" Width="160px"></asp:TextBox>
                        <br />
                        <br />
                        <font style="color: Black;">邮件:</font>
                        <asp:TextBox ID="TextBox2" Width="160px" runat="server"></asp:TextBox>
                        <br />
                        <br />
                        <font style="color: Black;">电话:</font>
                        <asp:TextBox ID="TextBox3" Width="160px" runat="server"></asp:TextBox>
                        <br />
                        <br />
                        <font style="color: Black;">会员卡号:</font>
                        <asp:TextBox ID="TextBox4" Width="160px" runat="server"></asp:TextBox>
                        <br />
                        <br />
                        <div style="padding: 0 0 0 50px; display: block; float: left">
                            <asp:Button ID="Button2" runat="server" Text="搜索" /></div>
                    </div>
                </div>
            </td>
            <td style="vertical-align: top;">
                <div>
                    <p>
                        <font style="font-weight: bold; font-size: 14px; margin: 5px 5px 10px 0; padding-bottom: 5px">
                            查看</font>
                        <asp:DropDownList ID="DropDownList1" runat="server" Width="150" Height="28px">
                            <asp:ListItem Selected="True" Value="0">所有客户</asp:ListItem>
                            <asp:ListItem Value="1">只消费过一次</asp:ListItem>
                            <asp:ListItem Value="2">一个月没来</asp:ListItem>
                            <asp:ListItem Value="3">半年没来</asp:ListItem>
                        </asp:DropDownList>
                    </p>
                    <div style="display: block; float: left;">
                        <asp:Button ID="Button1" runat="server" Text="新增客户" CssClass="btnCss" 
                            onclick="Button1_Click" />
                    </div>
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None"
                        Width="100%">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" Visible="False">
                            </asp:BoundField>
                            <asp:BoundField DataField="CustomerID" HeaderText="客户编号" SortExpression="CustomerID">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="名称">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("FirstName").ToString()+Eval("LastName").ToString() %>'></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName"
                                Visible="False"></asp:BoundField>
                            <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName"
                                Visible="False"></asp:BoundField>
                            <asp:BoundField DataField="Mobile" HeaderText="手机" SortExpression="Mobile">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Telephone" HeaderText="电话" SortExpression="Telephone">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Email" HeaderText="邮件" SortExpression="Email">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Birthday" HeaderText="生日" SortExpression="Birthday" DataFormatString="{0:yyyy-MM-dd}">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="LastLoginTime" 
                                DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HeaderText="最后登录时间" 
                                SortExpression="LastLoginTime" Visible="False">
                            <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Source" HeaderText="数据来源" SortExpression="Source">
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:BoundField>
                        </Columns>
                        <EditRowStyle BackColor="#999999" />
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#B2B2B2" Font-Bold="True" ForeColor="White" />
                        <PagerSettings FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                            PreviousPageText="上一页" Mode="NextPreviousFirstLast" 
                            Position="TopAndBottom" />
                        <PagerStyle HorizontalAlign="Right" Font-Size="Larger" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetObjListByCondition"
                        TypeName="mini_crm_Bo.CustomerManager"></asp:ObjectDataSource>
                </div>
            </td>
        </tr>
    </table>
    </form>
</asp:Content>
